import { ref, computed } from "vue";
import { defineStore } from "pinia";
import { getById } from "../service/student";

export const useStudentStore = defineStore("student", () => {
    const visible = ref(false);
    const student = ref({});
    async function fetchStudent(id){
        let res = await getById(id);
        student.value = res.data;
    }
    return {visible,student,fetchStudent};
});
